<template>
  <div ref='wrapper'>
    <slot></slot>
  </div>
</template>

<script>
import BScroll from '@better-scroll/core'
export default {
  name: 'Scroll',
  props: {
    probeType: {
      type: Number,
      default: 0
    }
  },
  mounted () {
    this.__initScroll()
  },
  methods: {
    __initScroll () {
      if (!this.$refs.wrapper) return
      const bs = new BScroll(this.$refs.wrapper, {
        probeType: 3,
        click: true
      })
    }
  }
}
</script>

<style scoped>
.wrapper {
  height: 300px;
}
</style>
